namespace Home.Domain.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class _612 : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("dbo.Article", "PArticleId", "dbo.PArticle");
            DropIndex("dbo.Article", new[] { "PArticleId" });
            AddColumn("dbo.Article", "Navbar", c => c.Int(nullable: false));
            AlterColumn("dbo.Article", "PArticleId", c => c.Int());
            AddForeignKey("dbo.Article", "PArticleId", "dbo.PArticle", "Id");
            CreateIndex("dbo.Article", "PArticleId");
        }
        
        public override void Down()
        {
            DropIndex("dbo.Article", new[] { "PArticleId" });
            DropForeignKey("dbo.Article", "PArticleId", "dbo.PArticle");
            AlterColumn("dbo.Article", "PArticleId", c => c.Int(nullable: false));
            DropColumn("dbo.Article", "Navbar");
            CreateIndex("dbo.Article", "PArticleId");
            AddForeignKey("dbo.Article", "PArticleId", "dbo.PArticle", "Id", cascadeDelete: true);
        }
    }
}
